package com.liuqi.knet.rpc.cluster;

import com.liuqi.knet.remoting.Client;
import com.liuqi.knet.remoting.RemotingException;
import com.liuqi.knet.remoting.exchange.ResponseFuture;

/**
 * 客户端集群
 *
 * @author liuqi
 * @date 2024/6/20 10:42
 **/
public interface Cluster {

    boolean isActive();

    void connect() throws RemotingException;

    void reconnect() throws RemotingException;

    void close();

    ResponseFuture request(Object request, int timeout) throws RemotingException;

    void send(Object message, boolean sent) throws RemotingException;

    Client[] clients();

}
